<template>
    <div class="data-upload-box">

        <div class="header">
            <div class="info">
                <h3 v-if="user !== ''">您现在作为{{ this.user }}用户上传数据</h3>
                <h3 v-else>您现在作为游客身份上传数据</h3>
            </div>
            <div class="btns">
                <el-button type="primary" @click="saveDatas">数据暂存</el-button>
                <el-button type="danger" @click="cleanDatas">清空本页数据</el-button>
                <el-button type="warning " @click="cleanCache">清空本地缓存</el-button>
            </div>
        </div>
        <div class="form-box">
            <el-form class="data-form" :model="main_form" label-width="150px">
                <h1>实验数据在线上传</h1>
                <el-col :span="24">
                    <h3>实验基础数据</h3>
                    <el-row>
                        <el-col :span="12">

                            <el-form-item label="创建时间">
                                <el-date-picker v-model="main_form.create_time" type="date" disabled placeholder="选择日期">
                                </el-date-picker>
                            </el-form-item>

                            <el-form-item label="更新时间">
                                <el-date-picker v-model="main_form.update_time" type="date" disabled placeholder="选择日期">
                                </el-date-picker>
                            </el-form-item>

                            <el-form-item label="备注">
                                <el-input v-model="main_form.remarks" placeholder="输入样例:备注"></el-input>
                            </el-form-item>

                            <el-form-item label="描述引用文献年份">
                                <el-date-picker v-model="main_form.ref_year" type="year" placeholder="选择年">
                                </el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">

                            <el-form-item label="描述引用文献DOI号">
                                <el-input v-model="main_form.ref_doi" placeholder="输入样例：DOI: 10.1039/c7ra02590d">
                                </el-input>
                            </el-form-item>

                            <el-form-item label="引用文献网页地址">
                                <el-input v-model="main_form.ref_url" placeholder="输入样例：url"></el-input>
                            </el-form-item>

                            <el-form-item label="数据类型">
                                <el-input v-model="main_form.data_type" placeholder="输入样例："></el-input>
                            </el-form-item>

                            <el-form-item label="合成方法">
                                <el-input v-model="main_form.syn_method" placeholder="输入样例：水热"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <h3>实验基础数据</h3>
                    <el-tooltip class="item" effect="dark" content="合成的是氧化铝粉体（或其负载催化剂）/氧化铝小球（或其负载催化剂）" placement="top">
                        <el-form-item label="目标产物">
                            <el-input v-model="main_form.target_product" placeholder="输入样例：氧化铝粉体"></el-input>
                        </el-form-item>
                    </el-tooltip>

                </el-col>
                <el-col :span="24">

                    <h3>含铝试剂</h3>
                    <el-row>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="使用的铝源试剂" placement="top">
                                <el-form-item label="铝源1">
                                    <el-input v-model="main_form.ac_reag1_name" placeholder="输入样例：异丙醇铝"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的铝源试剂的用量" placement="top">
                                <el-form-item label="铝源1用量">
                                    <el-input v-model="main_form.ac_reag1_dosage" placeholder="输入样例：100"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的铝源试剂" placement="top">
                                <el-form-item label="铝源2">
                                    <el-input v-model="main_form.ac_reag2_name" placeholder="输入样例：异丙醇铝"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的铝源试剂的用量" placement="top">
                                <el-form-item label="铝源2用量">
                                    <el-input v-model="main_form.ac_reag2_dosage" placeholder="输入样例：100"></el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="使用的铝源试剂" placement="top">
                                <el-form-item label="铝源3">
                                    <el-input v-model="main_form.ac_reag3_name" placeholder="输入样例：异丙醇铝"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的铝源试剂的用量" placement="top">
                                <el-form-item label="铝源3用量">
                                    <el-input v-model="main_form.ac_reag3_dosage" placeholder="输入样例：100"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的铝源试剂" placement="top">
                                <el-form-item label="铝源4">
                                    <el-input v-model="main_form.ac_reag4_name" placeholder="输入样例：异丙醇铝"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的铝源试剂的用量" placement="top">
                                <el-form-item label="铝源4用量">
                                    <el-input v-model="main_form.ac_reag4_dosage" placeholder="输入样例：100"></el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>
                    <h3>非铝试剂</h3>
                    <el-row>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂1">
                                    <el-input v-model="main_form.reag1_name" placeholder="输入样例：异丙醇"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂1用量">
                                    <el-input v-model="main_form.reag1_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂2">
                                    <el-input v-model="main_form.reag2_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂2用量">
                                    <el-input v-model="main_form.reag2_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂3">
                                    <el-input v-model="main_form.reag3_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂3用量">
                                    <el-input v-model="main_form.reag3_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂4">
                                    <el-input v-model="main_form.reag4_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂4用量">
                                    <el-input v-model="main_form.reag4_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂5">
                                    <el-input v-model="main_form.reag5_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂5用量">
                                    <el-input v-model="main_form.reag5_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂6">
                                    <el-input v-model="main_form.reag6_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂6用量">
                                    <el-input v-model="main_form.reag6_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂7">
                                    <el-input v-model="main_form.reag7_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂7用量">
                                    <el-input v-model="main_form.reag7_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂8">
                                    <el-input v-model="main_form.reag8_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂8用量">
                                    <el-input v-model="main_form.reag8_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂9">
                                    <el-input v-model="main_form.reag9_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂9用量">
                                    <el-input v-model="main_form.reag9_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂10">
                                    <el-input v-model="main_form.reag10_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂10用量">
                                    <el-input v-model="main_form.reag10_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="试剂11">
                                    <el-input v-model="main_form.reag11_name" placeholder="输入样例：水化液（水，异丙醇）"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）的用量"
                                placement="top">
                                <el-form-item label="试剂11用量">
                                    <el-input v-model="main_form.reag11_dosage" placeholder="输入样例：150"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="使用的非铝源试剂/（小球成型时胶溶剂，固化剂，黏结剂等任何非铝试剂）"
                                placement="top">
                                <el-form-item label="比例">
                                    <el-input v-model="main_form.proportion" placeholder="输入样例：1:03"></el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>


                    <h3>合成参数</h3>
                    <el-row>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="混合后调节的pH值" placement="top">
                                <el-form-item label="pH">
                                    <el-input autocomplete="on" v-model="main_form.rea_ph" placeholder="输入样例：2">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="混合搅拌的时间，单位h" placement="top">
                                <el-form-item label="搅拌时间">
                                    <el-input autocomplete="on" v-model="main_form.sub_stir_time" placeholder="输入样例：4">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="混合搅拌的速度，单位r*min-1" placement="top">
                                <el-form-item label="搅拌速率">
                                    <el-input autocomplete="on" v-model="main_form.sub_stir_speed"
                                        placeholder="输入样例：240">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="搅拌时的所处温度：默认时室温，单位 摄氏度" placement="top">
                                <el-form-item label="搅拌温度">
                                    <el-input autocomplete="on" v-model="main_form.sub_stir_temp" placeholder="输入样例：25">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="静置反应时间" placement="top">
                                <el-form-item label="静置时间">
                                    <el-input autocomplete="on" v-model="main_form.sub_static_time"
                                        placeholder="输入样例：3">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="静置反应温度，℃" placement="top">
                                <el-form-item label="静置温度">
                                    <el-input autocomplete="on" v-model="main_form.sub_static_temp"
                                        placeholder="输入样例：25">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="混合物老化反应时间，单位h（按需填写）" placement="top">
                                <el-form-item label="老化时间">
                                    <el-input autocomplete="on" v-model="main_form.sub_aging_time"
                                        placeholder="输入样例：12">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="混合物老化反应温度，单位摄氏度（按需填写）" placement="top">
                                <el-form-item label="老化温度">
                                    <el-input autocomplete="on" v-model="main_form.sub_aging_temp"
                                        placeholder="输入样例：60">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="混合物老化反应所需额外试剂（按需填写）" placement="top">
                                <el-form-item label="老化试剂">
                                    <el-input autocomplete="on" v-model="main_form.sub_aging_reagent"
                                        placeholder="输入样例：乙醇"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="混合物老化反应所处的气象环境（按需填写）" placement="top">
                                <el-form-item label="老化气氛">
                                    <el-input autocomplete="on" v-model="main_form.sub_aging_atmosphere"
                                        placeholder="输入样例：N2"></el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="水热反应/成球反应 单位h" placement="top">
                                <el-form-item label="反应时间">
                                    <el-input autocomplete="on" v-model="main_form.rea_time" placeholder="输入样例：6">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="水热反应/成球反应 单位摄氏度" placement="top">
                                <el-form-item label="反应温度">
                                    <el-input autocomplete="on" v-model="main_form.rea_temp" placeholder="输入样例：150">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="反应后化合物的干燥方式：离心，加热等" placement="top">
                                <el-form-item label="干燥方式">
                                    <el-input autocomplete="on" v-model="main_form.sub_drying_way"
                                        placeholder="输入样例： 加热">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="非离心干燥" placement="top">
                                <el-form-item label="干燥气氛">
                                    <el-input autocomplete="on" v-model="main_form.sub_drying_atmosphere"
                                        placeholder="输入样例：空气"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="非离心干燥" placement="top">
                                <el-form-item label="干燥时间">
                                    <el-input autocomplete="on" v-model="main_form.sub_drying_time"
                                        placeholder="输入样例：2">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="合成过程中产生的中间体" placement="top">
                                <el-form-item label="生成的前驱体">
                                    <el-input autocomplete="on" v-model="main_form.pre_name" placeholder="输入样例：γ-AlOOH">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="焙烧时间">
                                    <el-input autocomplete="on" v-model="main_form.sub_baking_time"
                                        placeholder="输入样例：12">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="焙烧气氛">
                                    <el-input autocomplete="on" v-model="main_form.sub_baking_atmosphere"
                                        placeholder="输入样例：N2"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="焙烧温度">
                                    <el-input autocomplete="on" v-model="main_form.sub_baking_temp"
                                        placeholder="输入样例：150">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>
                    <h3>油柱成球环境</h3>
                    <el-row>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="喷嘴形状">
                                    <el-input autocomplete="on" v-model="main_form.sph_shape" placeholder="输入样例：圆">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="喷嘴直径 单位mm">
                                    <el-input autocomplete="on" v-model="main_form.sph_diameter" placeholder="输入样例：20">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="压力">
                                    <el-input autocomplete="on" v-model="main_form.sph_pressure" placeholder="输入样例：1">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="表面性质">
                                    <el-input autocomplete="on" v-model="main_form.sph_character" placeholder="输入样例：无">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="流量">
                                    <el-input autocomplete="on" v-model="main_form.sph_flow" placeholder="输入样例：1">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="油柱尺寸">
                                    <el-input autocomplete="on" v-model="main_form.sph_size" placeholder="输入样例：10">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="油相温度">
                                    <el-input autocomplete="on" v-model="main_form.sph_temp" placeholder="输入样例：90">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="油粘度">
                                    <el-input autocomplete="on" v-model="main_form.sph_viscosity" placeholder="输入样例：1">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>
                    <h3>固相成球氧化铝参数、机器设备参数</h3>
                    <el-row>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="氧化铝柱直径">
                                    <el-input autocomplete="on" v-model="main_form.para_Al_diameter"
                                        placeholder="输入样例：20"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="氧化铝柱长度">
                                    <el-input autocomplete="on" v-model="main_form.para_Al_length"
                                        placeholder="输入样例：50">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="机器设备参数" placement="top">
                                <el-form-item label="圆盘直径">
                                    <el-input autocomplete="on" v-model="main_form.para_disk_diameter"
                                        placeholder="输入样例：20"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="机器设备参数" placement="top">
                                <el-form-item label="转速">
                                    <el-input autocomplete="on" v-model="main_form.para_rot_speed" placeholder="输入样例：1">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>
                    <h3>前驱体性质</h3>
                    <el-row>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="前驱体的BET表面积（m^2g^-1）" placement="top">
                                <el-form-item label="S(BET)">
                                    <el-input autocomplete="on" v-model="main_form.pre_S" placeholder="输入样例：675">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="前驱体的孔径（nm）" placement="top">
                                <el-form-item label="Pore siz">
                                    <el-input autocomplete="on" v-model="main_form.Pre_P" placeholder="输入样例：6.29">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="前驱体的孔容（cm^3g^-1）" placement="top">
                                <el-form-item label="Vt">
                                    <el-input autocomplete="on" v-model="main_form.Pre_V" placeholder="输入样例：0.27">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="前驱体产率" placement="top">
                                <el-form-item label="Yield(wt%)">
                                    <el-input autocomplete="on" v-model="main_form.pre_Y" placeholder="输入样例：11">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="其他的表征描述" placement="top">
                                <el-form-item label="其它表征性质">
                                    <el-input autocomplete="on" v-model="main_form.pre_O" placeholder="输入样例：可能是图表url">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>
                    <h3>氧化铝性质</h3>
                    <el-row>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="前驱体的BET表面积（m^2g^-1）" placement="top">
                                <el-form-item label="S（BET）">
                                    <el-input autocomplete="on" v-model="main_form.sign_SBET" placeholder="输入样例：675">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="前驱体的孔径（nm）" placement="top">
                                <el-form-item label="Pore siz">
                                    <el-input autocomplete="on" v-model="main_form.sign_poresiz"
                                        placeholder="输入样例：6.29">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="前驱体的孔容（cm^3g^-1）" placement="top">
                                <el-form-item label="Vt">
                                    <el-input autocomplete="on" v-model="main_form.sign_vt" placeholder="输入样例：0.27">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="前驱体产率" placement="top">
                                <el-form-item label="sign_yield">
                                    <el-input autocomplete="on" v-model="main_form.sign_yield" placeholder="输入样例：60">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="亲疏水性/（接触角）">
                                    <el-input autocomplete="on" v-model="main_form.sign_hydrophilicity_hydrophobicity"
                                        placeholder="输入样例：120"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="水解活性">
                                    <el-input autocomplete="on" v-model="main_form.sign_hyd_activity"
                                        placeholder="输入样例："></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="N2吸附">
                                    <el-input autocomplete="on" v-model="main_form.sign_adsorption" placeholder="输入样例：">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="其他的表征描述" placement="top">
                                <el-form-item label="其它表征性质">
                                    <el-input autocomplete="on" v-model="main_form.sign_chart_picture"
                                        placeholder="输入样例：可能是图表url"></el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>
                    <h3>催化剂制备</h3>
                    <el-row>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="催化剂的主要催化成份" placement="top">
                                <el-form-item label="负载试剂1">
                                    <el-input autocomplete="on" v-model="main_form.cata_load_reag1"
                                        placeholder="输入样例：PtCl3">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化剂的主要催化成份用量" placement="top">
                                <el-form-item label="负载试剂1用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_reag_dosage1"
                                        placeholder="输入样例：2"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化剂的主要催化成份" placement="top">
                                <el-form-item label="负载试剂2">
                                    <el-input autocomplete="on" v-model="main_form.cata_load_reag2"
                                        placeholder="输入样例：PtCl4">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化剂的主要催化成份用量" placement="top">
                                <el-form-item label="负载试剂2用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_reag_dosage2"
                                        placeholder="输入样例：3"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化剂的主要催化成份" placement="top">
                                <el-form-item label="负载试剂3">
                                    <el-input autocomplete="on" v-model="main_form.cata_load_reag3"
                                        placeholder="输入样例：PtCl5">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化剂的主要催化成份用量" placement="top">
                                <el-form-item label="负载试剂3用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_reag_dosage3"
                                        placeholder="输入样例：4"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化剂的主要催化成份" placement="top">
                                <el-form-item label="负载试剂4">
                                    <el-input autocomplete="on" v-model="main_form.cata_load_reag4"
                                        placeholder="输入样例：PtCl6">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化剂的主要催化成份用量" placement="top">
                                <el-form-item label="负载试剂4用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_reag_dosage4"
                                        placeholder="输入样例：5"></el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="采用浸渍法时浸渍时间" placement="top">
                                <el-form-item label="浸渍时间">
                                    <el-input autocomplete="on" v-model="main_form.cata_imp_time" placeholder="输入样例：2">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="采用浸渍法时浸渍温度" placement="top">
                                <el-form-item label="浸渍温度">
                                    <el-input autocomplete="on" v-model="main_form.cata_imp_temp" placeholder="输入样例：3">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="干燥时间">
                                    <el-input autocomplete="on" v-model="main_form.cata_dry_time" placeholder="输入样例：2">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="干燥温度">
                                    <el-input autocomplete="on" v-model="main_form.cata_dry_temp" placeholder="输入样例：3">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="煅烧时间">
                                    <el-input autocomplete="on" v-model="main_form.cata_cal_time" placeholder="输入样例：7">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="" placement="top">
                                <el-form-item label="煅烧温度">
                                    <el-input autocomplete="on" v-model="main_form.cata_cal_temp" placeholder="输入样例：55">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>
                    <h3>催化剂的表征</h3>
                    <el-tooltip class="item" effect="dark" content="催化剂的表征性质，BET，制备催化剂时的产率，制备催化剂时的转化率等" placement="top">
                        <el-form-item label="性质1">
                            <el-input autocomplete="on" v-model="main_form.cata_cha1" placeholder="输入样例：675"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="催化剂的表征性质，BET，制备催化剂时的产率，制备催化剂时的转化率等" placement="top">
                        <el-form-item label="性质2">
                            <el-input autocomplete="on" v-model="main_form.cata_cha2" placeholder="输入样例：6.29">
                            </el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="催化剂的表征性质，BET，制备催化剂时的产率，制备催化剂时的转化率等" placement="top">
                        <el-form-item label="性质3">
                            <el-input autocomplete="on" v-model="main_form.cata_cha3" placeholder="输入样例：0.27">
                            </el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="催化剂的表征性质，BET，制备催化剂时的产率，制备催化剂时的转化率等" placement="top">
                        <el-form-item label="性质4">
                            <el-input autocomplete="on" v-model="main_form.cata_cha4" placeholder="输入样例：11"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="催化剂的表征性质，BET，制备催化剂时的产率，制备催化剂时的转化率等" placement="top">
                        <el-form-item label="性质5">
                            <el-input autocomplete="on" v-model="main_form.cata_cha5" placeholder="输入样例：12"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="催化剂的表征性质，BET，制备催化剂时的产率，制备催化剂时的转化率等" placement="top">
                        <el-form-item label="性质6">
                            <el-input autocomplete="on" v-model="main_form.cata_cha6" placeholder="输入样例：url"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <h3>催化性能</h3>
                    <el-row>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="参与反应的反应物" placement="top">
                                <el-form-item label="反应组分1">
                                    <el-input autocomplete="on" v-model="main_form.cata_const1" placeholder="输入样例：丙烷">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="参与反应的反应物用量" placement="top">
                                <el-form-item label="反应组分1用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_const_dosage1"
                                        placeholder="输入样例：1"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="参与反应的反应物" placement="top">
                                <el-form-item label="反应组分2">
                                    <el-input autocomplete="on" v-model="main_form.cata_const2" placeholder="输入样例：甲烷">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="参与反应的反应物用量" placement="top">
                                <el-form-item label="反应组分2用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_const_dosage2"
                                        placeholder="输入样例：2"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="参与反应的反应物" placement="top">
                                <el-form-item label="反应组分3">
                                    <el-input autocomplete="on" v-model="main_form.cata_const3" placeholder="输入样例：乙烷">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="参与反应的反应物用量" placement="top">
                                <el-form-item label="反应组分3用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_const_dosage3"
                                        placeholder="输入样例：3"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化反应时所处温度" placement="top">
                                <el-form-item label="反应温度">
                                    <el-input autocomplete="on" v-model="main_form.cata_pro_temp" placeholder="输入样例：25">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化反应的时间" placement="top">
                                <el-form-item label="反应时间">
                                    <el-input autocomplete="on" v-model="main_form.cata_pro_time" placeholder="输入样例：20">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="12">
                            <el-tooltip class="item" effect="dark" content="催化反应的产物" placement="top">
                                <el-form-item label="产物1">
                                    <el-input autocomplete="on" v-model="main_form.cata_product1" placeholder="输入样例：丙烯">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化反应的产物生成量" placement="top">
                                <el-form-item label="产物1用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_dosage1" placeholder="输入样例：1">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化反应的产物" placement="top">
                                <el-form-item label="产物2">
                                    <el-input autocomplete="on" v-model="main_form.cata_product2" placeholder="输入样例：甲醛">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化反应的产物生成量" placement="top">
                                <el-form-item label="产物2用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_dosage2" placeholder="输入样例：1">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化反应的产物" placement="top">
                                <el-form-item label="产物3">
                                    <el-input autocomplete="on" v-model="main_form.cata_product3" placeholder="输入样例：乙烯">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化反应的产物生成量" placement="top">
                                <el-form-item label="产物3用量">
                                    <el-input autocomplete="on" v-model="main_form.cata_dosage3" placeholder="输入样例：3">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="产物的产率" placement="top">
                                <el-form-item label="产率">
                                    <el-input autocomplete="on" v-model="main_form.cata_pro_yield"
                                        placeholder="输入样例：90">
                                    </el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="反应物的转化率" placement="top">
                                <el-form-item label="转换率">
                                    <el-input autocomplete="on" v-model="main_form.cata_pro_transform"
                                        placeholder="输入样例：90"></el-input>
                                </el-form-item>
                            </el-tooltip>
                            <el-tooltip class="item" effect="dark" content="催化剂的耐久度" placement="top">
                                <el-form-item label="耐久度">
                                    <el-input autocomplete="on" v-model="main_form.cata_pro_endurance"
                                        placeholder="输入样例：3000"></el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>
                    <h3>描述</h3>
                    <el-tooltip class="item" effect="dark" content="" placement="top">
                        <el-form-item label="描述关键的化学键1">
                            <el-input autocomplete="on" v-model="main_form.bond1" placeholder="输入样例：1"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="" placement="top">
                        <el-form-item label="描述关键的化学键2">
                            <el-input autocomplete="on" v-model="main_form.bond2" placeholder="输入样例：1"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="" placement="top">
                        <el-form-item label="描述关键的化学键3">
                            <el-input autocomplete="on" v-model="main_form.bond3" placeholder="输入样例：1"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="" placement="top">
                        <el-form-item label="描述关键的结构角度1">
                            <el-input autocomplete="on" v-model="main_form.angle1" placeholder="输入样例：1"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="" placement="top">
                        <el-form-item label="描述关键的结构角度2">
                            <el-input autocomplete="on" v-model="main_form.angle2" placeholder="输入样例：1"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="" placement="top">
                        <el-form-item label="描述关键的结构角度3">
                            <el-input autocomplete="on" v-model="main_form.angle3" placeholder="输入样例：1"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="" placement="top">
                        <el-form-item label="描述关键的能量1">
                            <el-input autocomplete="on" v-model="main_form.energy1" placeholder="输入样例：1"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="" placement="top">
                        <el-form-item label="描述关键的能量2">
                            <el-input autocomplete="on" v-model="main_form.energy2" placeholder="输入样例：1"></el-input>
                        </el-form-item>
                    </el-tooltip>
                    <el-tooltip class="item" effect="dark" content="" placement="top">
                        <el-form-item label="描述关键的能量3">
                            <el-input autocomplete="on" v-model="main_form.energy3" placeholder="输入样例：1"></el-input>
                        </el-form-item>
                    </el-tooltip>
                </el-col>

            </el-form>
        </div>
        <div class="buttons">
            <el-button v-if="uploading === false" type="primary" size="medium" @click="uploadDatas()">确定上传</el-button>
            <el-button v-else :loading="true" type="primary" size="medium">上传中</el-button>
        </div>
    </div>
</template>
<script>
import Axios from "axios";
import NProgress from 'nprogress' // progress bar
NProgress.configure({ showSpinner: false }) // NProgress Configuration


export default {
    data() {
        return {
            main_form: {
                importer: "",//录入者id信息
                ac_reag1_dosage: "",
                ac_reag1_name: "",
                ac_reag2_dosage: "",
                ac_reag2_name: "",
                ac_reag3_dosage: "",
                ac_reag3_name: "",
                ac_reag4_dosage: "",
                ac_reag4_name: "",
                angle1: "",
                angle2: "",
                angle3: "",
                bond1: "",
                bond2: "",
                bond3: "",
                cata_cal_temp: "",
                cata_cal_time: "",
                cata_cha1: "",
                cata_cha2: "",
                cata_cha3: "",
                cata_cha4: "",
                cata_cha5: "",
                cata_cha6: "",
                cata_const1: "",
                cata_const2: "",
                cata_const3: "",
                cata_const_dosage1: "",
                cata_const_dosage2: "",
                cata_const_dosage3: "",
                cata_dosage1: "",
                cata_dosage2: "",
                cata_dosage3: "",
                cata_dry_temp: "",
                cata_dry_time: "",
                cata_imp_temp: "",
                cata_imp_time: "",
                cata_load_reag1: "",
                cata_load_reag2: "",
                cata_load_reag3: "",
                cata_load_reag4: "",
                cata_pro_endurance: "",
                cata_pro_temp: "",
                cata_pro_time: "",
                cata_pro_transform: "",
                cata_pro_yield: "",
                cata_product1: "",
                cata_product2: "",
                cata_product3: "",
                cata_reag_dosage1: "",
                cata_reag_dosage2: "",
                cata_reag_dosage3: "",
                cata_reag_dosage4: "",
                create_time: "",
                data_type: "",
                energy1: "",
                energy2: "",
                energy3: "",
                importer: "",
                para_Al_diameter: "",
                para_Al_length: "",
                para_disk_diameter: "",
                para_rot_speed: "",
                re_O: "",
                pre_P: "",
                pre_S: "",
                pre_V: "",
                pre_Y: "",
                pre_name: "",
                proportion: "",
                rea_ph: "",
                rea_temp: "",
                rea_time: "",
                reag1_dosage: "",
                reag1_name: "",
                reag2_dosage: "",
                reag2_name: "",
                reag3_dosage: "",
                reag3_name: "",
                reag4_dosage: "",
                reag4_name: "",
                reag5_dosage: "",
                reag5_name: "",
                reag6_dosage: "",
                reag6_name: "",
                reag7_dosage: "",
                reag7_name: "",
                reag8_dosage: "",
                reag8_name: "",
                reag9_dosage: "",
                reag9_name: "",
                reag10_dosage: "",
                reag10_name: "",
                reag11_dosage: "",
                reag11_name: "",
                ref_doi: "",
                ref_url: "",
                ref_year: "",
                remarks: "",
                reserved_field1_float: "",
                reserved_field1_int: "",
                reserved_field1_str: "",
                reserved_field2_float: "",
                reserved_field2_int: "",
                reserved_field2_str: "",
                reserved_field3_float: "",
                reserved_field3_int: "",
                reserved_field3_str: "",
                reserved_field4_float: "",
                reserved_field4_int: "",
                reserved_field4_str: "",
                reserved_field5_float: "",
                reserved_field5_int: "",
                reserved_field5_str: "",
                sign_SBET: "",
                sign_adsorption: "",
                sign_chart_picture: "",
                sign_hyd_activity: "",
                sign_hydrophilicity_hydrophobicity: "",
                sign_poresiz: "",
                sign_vt: "",
                sign_yield: "",
                sph_character: "",
                sph_diameter: "",
                sph_flow: "",
                sph_pressure: "",
                sph_shape: "",
                sph_size: "",
                sph_temp: "",
                sph_viscosity: "",
                sub_aging_atmosphere: "",
                sub_aging_reagent: "",
                sub_aging_temp: "",
                sub_aging_time: "",
                sub_baking_atmosphere: "",
                sub_baking_temp: "",
                sub_baking_time: "",
                sub_drying_atmosphere: "",
                sub_drying_time: "",
                sub_drying_way: "",
                sub_static_temp: "",
                sub_static_time: "",
                sub_stir_speed: "",
                sub_stir_temp: "",
                sub_stir_time: "",
                syn_method: "",
                target_product: "",
                update_time: "",
            },
            uploading: false,
            user: '',//用户信息
            patt: /^[1][3-9][\d]{9}/,
            isName: true,
        }
    },
    mounted() {
        var afterUrl = window.location.search.substring(1);
        console.log(afterUrl);
        var afterEqual = afterUrl.slice(5)
        console.log(afterEqual);

        if (this.patt.test(afterEqual)) {
            this.isName = false;
        }
        let Ev_users;
        this.isName ? Ev_users = { name: afterEqual } : Ev_users = { phone: afterEqual }
        console.log(Ev_users)
        Axios.post('http://c7.cabc.top:8209/get', {
            Ev_users,
        }).then(res => {
            console.log(res);
            if (res.data) {
                this.user = res.data.Ev_users.name;
                this.main_form.importer = res.data.Ev_users.id;
            }
        }).catch(err => {
            console.log(err);
        })

        let data = localStorage.getItem('main_form')
        if (data !== null) {
            this.$confirm('检测到本地有暂存的数据，是否恢复?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                this.main_form = JSON.parse(data)
                this.$message.success('恢复成功！')
            }).catch(() => {

            });
        }

    },
    methods: {
        uploadDatas() {
            NProgress.start();
            this.$confirm('请您确认信息上传无误，否则可能影响数据审核，是否继续上传？', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '我在看看',
                type: 'warning'
            }).then(() => {
                ////
                this.uploading = true;
                let _obj = JSON.stringify(this.main_form)
                let obj = JSON.parse(_obj)//深拷贝

                Object.keys(obj).forEach(item => {
                    if (obj[item] === '' || obj[item] === undefined || obj[item] === null || obj[item] === 'null') delete obj[item]
                })//遍历数组删除空属性
                let token = localStorage.getItem('token') || undefined
                if (token === undefined) {
                    this.$message.error('登陆过期，请重新登陆')
                    return 0;
                } else {
                    let headers = {
                        "Authorization": token
                    };
                    Axios.post('http://c7.cabc.top:8222/api/v1.0/jwt/APIjson/post/', {
                        headers,
                        Ev_che_react: obj,
                    }).then(res => {
                        console.log(res);
                        if (res.data.code == 200 && res.data.ok == true) {
                            this.$message.success('数据上传成功！')
                            NProgress.done();
                            this.uploading = false;
                        }
                    }).catch(err => {
                        console.log(err);
                        this.$message.error('数据上传失败！')
                        NProgress.done()
                        this.uploading = false;
                    })
                }

            }).catch(() => {
                this.$message('已取消上传')
                return 0;
            });

        },
        cleanDatas() {
            this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                for (let value in this.main_form) {
                    this.main_form[value] = "";
                }
                this.$message({
                    type: 'success',
                    message: '删除成功!'
                });
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消删除'
                });
            });

        },
        saveDatas() {
            localStorage.setItem("main_form", JSON.stringify(this.main_form))
            this.$message.success('本地存储成功！')
        },
        cleanCache() {
            localStorage.removeItem("main_form")
            this.$message.success('删除缓存成功！')
        }
    },
}
</script>
<style scoped>
h1 {
    margin: 50px 0;
}

h3 {
    margin: 30px 0;
    color: rgb(191, 102, 39);
    margin-left: 10px;
}

.data-upload-box {

    width: 90%;
    margin: 50px auto;
}

.data-form {
    width: 80%;
}

.form-box {
    overflow: hidden;
}

.buttons {
    margin: 100px auto;
    display: flex;
    justify-content: center;
}

.header {
    display: flex;
    justify-content: space-between;
}

.btns {
    margin: auto 0;
}
</style>